{{extends file="admin/admin_header.tpl"}}
{{block name="content"}}
<form action="{{site_url("document/Sort?&data=url")}}" method="post">
	<h3>内容管理
		
		<div class="pull-right">
			<a href="{{site_url("$url")}}" class="btn btn-sm btn-success">
				添加新内容
			</a>
		</div>
	</h3>
	
	<div class="col-sm-3 content-sidebar">
		{{include file="admin/tree.tpl"}}
	</div>
	<div class="col-sm-9 content-main">
		<p><span class="current-column">
		当前栏目:{{$cateNow.0.CateName}}
		</span>
		<button type="submit" class="btn btn-xs btn-success" style="margin-left:20px;">排序</button>
		</p>
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th style="width:5%;">排序</th>
						<th style="width:5%;">Id</th>
						<th style="width:40%;">链接名称</th>
						<th style="width:10%;">链接地址</th>
						<th style="width:20%;text-align: center;">操作</th>
					</tr>
				</thead>
				<tbody>
					{{foreach $data as $v}}
					<tr>
						<td style="text-align:center;">
							<input type="text" style="width:50px;height:20px;text-align:center;" name="{{$v.Id}}" value="{{$v.Sort}}">
						</td>
						<td>{{$v.Id}}</td>
						<td><p style="margin: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width: 200px;">{{$v.UrlName}}</p></td>
						<td>{{$v.Url}}</td>
						<td style="text-align: center;width: 10%;">
							<a href="{{site_url("document/EditUrlPage?Id={{$v.Id}}")}}" class="btn btn-xs btn-primary">编辑</a>
							<a href="javascript:void(0)" onclick="modal('{{site_url("document/DeleteUrl?Id={{$v.Id}}")}}')" class="btn btn-xs btn-danger">删除</a>
						</td>
					</tr>
					{{/foreach}}
				</tbody>
			</table>
		</div>
	</div>
	{{/block}}
